import request from '@/utils/request'

// 查询品牌列表
export function listGoods(query) {
  return request({
    url: '/order/goods',
    method: 'get',
    params: query
  })
}

// 查询品牌详细
export function getGoods(goodsId) {
  return request({
    url: '/order/goods/' + goodsId,
    method: 'get'
  })
}

// 新增品牌
export function addGoods(data) {
  return request({
    url: '/order/goods',
    method: 'post',
    data: data
  })
}
// 新增自定义价格
export function customAdddictLabel(data) {
  return request({
    url: '/system/dict/data/customAdd',
    method: 'post',
    data: data
  })
}

// 修改品牌
export function updateGoods(data) {
  return request({
    url: '/order/goods',
    method: 'put',
    data: data
  })
}

// 删除定时任务调度
export function delGoods(goodsIds) {
  return request({
    url: '/order/goods/' + goodsIds,
    method: 'delete'
  })
}
// 刷新缓存
export function refreshCache() {
  return request({
    url: '/system/dict/type/refreshCache',
    method: 'delete'
  })
}

export default {
  list:listGoods,
  get:getGoods,
  add:addGoods,
  update:updateGoods,
  del:delGoods,
}